import 'package:json_annotation/json_annotation.dart';

part 'class.g.dart';

@JsonSerializable()
class ClassData {
  String id;
  String name;
  String type;
  String state;
  int isHistory;
  String subjectId;
  String subjectName;

  ClassData({this.id,
    this.name,
    this.type,
    this.state,
    this.isHistory,
    this.subjectId,
    this.subjectName});


//反序列化
  factory ClassData.fromJson(Map<String, dynamic> json) => _$ClassDataFromJson(json);
//序列化
  Map<String, dynamic> toJson() => _$ClassDataToJson(this);
}